<!--
 * @Description:
 * @Author: mxy
 * @Date: 2022-12-10 09:33:02
 * @LastEditors: mxy
 * @LastEditTime: 2022-12-10 20:18:29
-->
<template>
  <div>
    <h1>app</h1>

    <p>{{ $store.state.user.age }}</p>
    <p>{{ $store.getters['user/aaa'] }}</p>
    <button @click="$store.commit('user/updateAge')">同步更新</button>
    <button @click="$store.dispatch('user/updateAgeAfter1s', 5)">
      异步更新
    </button>
    <my-test></my-test>
  </div>
</template>

<script>
import MyTest from '@/components/MyTest.vue'
export default {
  components: { MyTest }
}
</script>

<style></style>
